import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', () => {
  const token = ref('')

  const isLogin = computed(() => !!token.value)

  const setToken = (val: string) => {
    token.value = val
  }

  return {
    token,
    isLogin,
    setToken,
  }
})
